﻿namespace ModuleOne
{
    using System;
    using System.ComponentModel.Composition;
    using System.IO;

    using MEF_Test.Contracts;

    [Export(typeof(IMediaHandlerFactory))]
    [ExportMetadata("ContentType", "folder/local")]
    public class LocalFolderMediaHandlerFactory : IMediaHandlerFactory
    { 
        public Stream GetStream()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Gets the caption.
        /// </summary>
        /// <value>The caption.</value>
        public string Caption { get; private set; }

        /// <summary>
        /// Creates the specified media handler.
        /// </summary>
        /// <param name="fileHandler">The file handler.</param>
        /// <returns>An instance of an <see cref="IMediaHandler"/>.</returns>
        public IMediaHandler Create(IFileHandler fileHandler)
        {
            return new LocalFolderMediaHandler(fileHandler);
        }
    }
}